@extends('admin.common.base-master')

@section('html-head')
    <link rel="stylesheet" href="{{url('css/admin/jquery.lineProgressbar.css')}}">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

    <script src="{{url('js/jquery.lineProgressbar.js')}}" type="text/javascript"></script>
    <script src="{{url('js/echarts.min.js')}}" type="text/javascript"></script>
    <script src="{{url('js/jquery-ui-1.10.1.custom.min.js')}}" type="text/javascript"></script>
    <script src="{{url('js/amazeui.datetimepicker.min.js')}}" type="text/javascript"></script>
    <script src="{{url('js/jquery.ui.datepicker-zh-CN.js')}}" type="text/javascript"></script>
@endsection

@section('html-body')
    <!-- content start -->
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="#">财务管理</a>
        </div>
        <!-- cur-position end -->
        @include('admin.common.finance-header')


        <h3 class="zb-head">收入数据显示</h3>
        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>总收入金额</th>
                    <th>每日收入金额</th>
                    <th>每月收入金额</th>
                </tr>
                </thead>
                <tbody class="tbody-trend">
                <tr style="height: 55px">
                    <td class="first">
                        <span class="head">{{$totalIncome}}</span>
                    </td>
                    <td>
                        <span class="head">{{$todayIncome}}</span>
                    </td>
                    <td>
                        <span class="head">{{$thisMonthIncome}}</span>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <script>
        $(function(){

            $(document).on("click",".del",function(){
                var id = $(this).attr("data-id");
                $.ajax({
                    url:'{{route("Api.Admin.sys.delAdmin")}}',
                    type:'post',
                    dataType:'json',
                    data:{id:id},
                    success:function(obj) {
                        if (obj.level == "success") {
                            $("#banner_" + id).hide('slow');
                        } else if (obj.level == "error") {
                            noty({text: obj.message, type: obj.level, timeout: 600});

                        }
                    },
                    error:function(obj){
                        console.log(obj);
                    }

                });
            });
        });
    </script>
    <!-- content end -->

@endsection